package br.com.segpswd.util;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class Constantes {

	private static boolean resultAlertConfirmation;
	
	public static final String NOME_PROJETO = "SegPswd";
	
	public static View getLayoutInflaterView(int layoutId, ViewGroup viewGroup, Activity activity) {
		
		LayoutInflater inflater = activity.getLayoutInflater();
		View layout = inflater.inflate(layoutId, viewGroup);
		
		return layout;
	}
	
	public static AlertDialog.Builder alertConfimarcao(Context context, 
			CharSequence title, CharSequence message) {
		
		
		AlertDialog.Builder alertConfirmation = new AlertDialog.Builder(context);
		alertConfirmation.setTitle(title);
		alertConfirmation.setMessage(message);
		alertConfirmation.setCancelable(false);
		
		return alertConfirmation;
	}
	
	public static AlertDialog.Builder alertInfo(Context context, 
			CharSequence title, CharSequence message, Drawable img) {
		
		
		AlertDialog.Builder alertInfo = new AlertDialog.Builder(context);
		if(title != null)
			alertInfo.setTitle(title);
		alertInfo.setMessage(message);
		alertInfo.setCancelable(false);
		if(img != null)
			alertInfo.setIcon(img);
		
		return alertInfo;
	}
}
